import { parseMcFunction } from ".";
import { GiveUpParsing, MDPPlugin } from "../../core";

export default function McFunction(): MDPPlugin {
    return {
        async parse(file) {
            if (!file.file.filename.endsWith(".mcfunction")) throw new GiveUpParsing();
            return parseMcFunction(file.raw);
        },
    };
}